Gallery View
open class GalleryView : RelativeLayout, RevelControl, DownloadFeedTask2.OnCompleted, DownloadImageTask2.OnCompleted, QueryVideoInfosTask.OnCompleted, DownloadFileTask2.OnCompleted, PlaceExchangeAdRequestTask.OnCompleted, OnCommandListener, VistarAdRequestTask.OnCompleted, PlayedHandler
A custom RelativeLayout that displays a gallery of different types of media, including images, videos, and web content.
The GalleryView
is responsible for managing a playlist of media sources defined by a com.reveldigital.player.api.Module. It handles the loading, display, and transitioning between these sources. It supports various content types such as local files, remote URLs, RSS feeds, YouTube videos, and content from ad platforms like Place Exchange and Vistar Media.
Key functionalities include:
- Inflating appropriate layouts based on device capabilities and preferences (e.g., SurfaceView vs. TextureView, ExoPlayer).
- Managing playback state (start, stop, pause, next, previous).
- Handling transitions between media items (e.g., fade animations).
- Downloading and caching media content.
- Interacting with web content via a Javascript interface.
- Listening to and dispatching playback events (e.g., item played, playlist completed).
- Integrating with external ad services for dynamic ad insertion.
- Responding to commands (e.g., from a remote control or server).
This view implements various listener interfaces to react to asynchronous operations like downloads and ad requests, and RevelControl to provide a standardized interface for controlling media playback.
See also
Constructors
Functions
Link copied to clipboard
Adds an OnCallbackListener to the list of listeners that will be notified of callback events.
Link copied to clipboard
Registers a `PlaylistListener` to receive notifications about playlist events.
Link copied to clipboard
Gets an iterator over the configuration s for this control.
Link copied to clipboard
Gets the associated with this control, if any.
Link copied to clipboard
Gets the type of the underlying module or content associated with this control.
Link copied to clipboard
Gets the current VideoViewImpl used by this presenter.
Link copied to clipboard
Initializes the control with its associated module context.
Link copied to clipboard
Checks if this control is configured to start its operation automatically after #initialize(Module) initialization.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Registers a listener to be notified when a played event occurs.
Link copied to clipboard
Removes an OnCallbackListener from the list of listeners that are notified when an event occurs.
Link copied to clipboard
Removes a playlist listener that was previously added with addPlaylistListener.
Link copied to clipboard
Sets whether this control should start its operation automatically after #initialize(Module) initialization.
Link copied to clipboard
Sets whether the video should loop seamlessly.
Link copied to clipboard
Sets and plays the specified
Source
in the playlist.Sets and plays the source specified by playlist index (0 based).
Sets the current source.
Set the source by index (0 based).